/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.googlecode.jmicroerp.wicket.administrare;
    
import com.googlecode.jmicroerp.model.ZZZ;
import com.googlecode.jmicroerp.model.Magazin;
import com.googlecode.jmicroerp.wicket.DefaultPageTemplate;
import com.googlecode.jmicroerp.wicket.components.grid.ActionButton;
import com.googlecode.jmicroerp.wicket.components.grid.ActionButtons;
import com.googlecode.jmicroerp.wicket.components.grid.ColumnModel;
import com.googlecode.jmicroerp.wicket.components.grid.DefaultGridAction;
import com.googlecode.jmicroerp.wicket.components.grid.Grid;
import com.googlecode.jmicroerp.wicket.components.grid.PageParameters;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import org.apache.wicket.spring.injection.annot.SpringBean;

/**
 *
 * @author Alexandru.Codescu
 */
public class VizualizareZZZPage extends DefaultPageTemplate {
    @SpringBean(name = "defaultGridAction")
    private DefaultGridAction<ZZZ> gridAction;
    
    
    public VizualizareZZZPage() {
        
        ColumnModel[] grids = {
            new ColumnModel<String>("Magazin", "magazin.denumire", String.class),
            new ColumnModel<Date>("Data Adaugare", "dataAdaugarii", Date.class),
            new ColumnModel<BigDecimal>("Valoare", "valoareTotala", BigDecimal.class),
            new ColumnModel<String>("Denumire", "denumire", String.class)
        };
        List<ColumnModel> columns = Arrays.asList(grids);
        ActionButton actionButton = new ActionButton(new PageParameters(EditareZZZPage.class));
        ActionButtons actionButtons = new ActionButtons(actionButton);
        Grid<ZZZ> dataGridConsum = new Grid<ZZZ>("grid", columns, ZZZ.class, gridAction, actionButtons);
        add(dataGridConsum);
    }
}